package com.yuan.recv;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author 小源同学
 * @Date 2022 02 05 22 50
 * @Describe Please describe the role of this class
 **/
@Component
//监听队列
@RabbitListener(queues = "amqp_queue")
public class RevInit {

    //监听消息之后的处理方法
    @RabbitHandler
    public void testRev(String message) {
        System.out.println("接收到了" + message);
    }
}
